package com.sunyur.tailor.channel.web.outer.expense.dto;


import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;


/**
 * @Author pengbing
 * @Description 批量新增或修改费用类型入参实体类
 * @Date 14:00 2021/7/28
 * @Param
 * @return
 **/
@Data
public class ExpenseTypeListDTO implements Serializable {

     @Valid
     @NotNull(message = "费用类型集合不能为空")
     @Size(max = 20, message = "费用类型集合长度不能超过20")
     private List<ExpenseTypeDTO>  expenseTypes;

     @Data
     public static class ExpenseTypeDTO implements Serializable  {
          @NotEmpty(message = "费用类型编码不能为空")
          @Size(max = 64, message = "外部费用类型编码长度不能超过64")
          private String outSideCode;

          @Size(max = 64, message = "费用类型名称长度不能超过64")
          private String name;

          @Size(max = 100, message = "费用类型备注长度不能超过100")
          private String remark;

          @Size(max = 64, message = "费用类型父级长度不能超过64")
          private String parentOutSideCode;
     }
}